package com.studay.bean;

import java.util.ArrayList;


import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * 点播项目信息
 * 
 * @author LY
 * 
 */
public class DianBoPojo implements Parcelable {

	ArrayList<Course> childList = new ArrayList<Course>();// 包含课程
	private String name; // 项目名
	private String remark;// 项目简介
	private int credit; // 学分
	private int pid; //id 

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public ArrayList<Course> getChildList() {
		return childList;
	}

	public void setChildList(ArrayList<Course> childList) {
		this.childList = childList;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int getCredit() {
		return credit;
	}

	public void setCredit(int credit) {
		this.credit = credit;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		Bundle b = new Bundle();
		b.putParcelableArrayList("childList", childList);
		dest.writeBundle(b);
		dest.writeString(name);
		dest.writeString(remark);
		dest.writeInt(credit);
	}

	public static final Parcelable.Creator<DianBoPojo> CREATOR = new Creator<DianBoPojo>() {
		public DianBoPojo createFromParcel(Parcel source) {
			DianBoPojo contact = new DianBoPojo();
			Bundle b = source.readBundle(Course.class.getClassLoader());
			contact.childList = b.getParcelableArrayList("childList");
			contact.name = source.readString();
			contact.remark = source.readString();
			contact.credit = source.readInt();
			return contact;
		}

		public DianBoPojo[] newArray(int size) {
			return new DianBoPojo[size];
		}
	};
}